// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   ActivityStack.java

package com.sgame.android;

import android.app.Activity;
import java.util.Stack;

/**
 * @deprecated Class ActivityStack is deprecated
 */

public class ActivityStack extends Stack
{

    private ActivityStack()
    {
    }

    public static ActivityStack getInstance()
    {
        if(sInstance == null)
            sInstance = new ActivityStack();
        return sInstance;
    }

    public void popIfMe(Activity a)
    {
        if(size() > 0 && peek().equals(a))
            pop();
    }

    public Activity peek()
    {
        if(isEmpty())
            return null;
        else
            return (Activity)super.peek();
    }

    public Activity getRoot()
    {
        if(empty())
            return null;
        else
            return (Activity)get(0);
    }

    private static final long serialVersionUID = 0x24430819056d7433L;
    private static ActivityStack sInstance;
}
